natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
internalization and categorical algebra
algebra object (associative, Lie, …)
Type theory and certain kinds of category theory are closely related. By a syntax-semantics duality one may view type theory as a formal syntactic language or calculus for category theory, and conversely one may think of category theory as providing semantics for type theory. The flavor of category theory used depends on the flavor of type theory; this also extends to homotopy type theory and certain kinds of (∞,1)-category theory.
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
We discuss here formalizations and proofs of the relation/equivalence between various flavors of type theories and the corresponding flavors of categories.
Dependent type theory and locally cartesian closed categories
Homotopy type theory and locally cartesian closed (∞,1)-categories
The functors
, that form a category of contexts of a first-order theory;
, that forms the internal language of a hyperdoctrine
constitute an equivalence of categories
We discuss here how dependent type theory is the syntax of which locally cartesian closed categories provide the semantics. For a dedicated discussion of this (and the subtle coherence issues involved) see also at categorical model of dependent types.
There are 2-functors
, that forms a category of contexts of a Martin-Löf dependent type theory;
that forms the internal language of a locally cartesian closed category
that constitute an equivalence of 2-categories
This was originally claimed as an equivalence of categories (Seely, theorem 6.3). However, that argument did not properly treat a subtlety central to the whole subject: that substitution of terms for variables composes strictly, while its categorical semantics by pullback is by the very nature of pullbacks only defined up to isomorphism. This problem was pointed out and ways to fix it were given in (Curien) and (Hofmann); see categorical model of dependent types for the latter. However, the full equivalence of categories was not recovered until (Clairambault-Dybjer) solved both problems by promoting the statement to an equivalence of 2-categories, see also (Curien-Garner-Hofmann). Another approach to this which also works with intensional identity types and hence with homotopy type theory is in (Lumsdaine-Warren 13).
We now indicate some of the details.
For definiteness, self-containedness and for references below, we say what a dependent type theory is, following (Seely, def. 1.1).
A Martin-Löf dependent type theory is a theory with some signature of dependent function symbols with values in types and in terms (…) subject to the following rules
type formation rules
is a type (the unit type);
if are terms of type , then is a type (the equality type);
if and are types, depending on a free variable of type , then the following symbols are types
(dependent product), written also if in fact does not depend on ;
(dependent sum), written also if in fact does not depend on ;
term formation rules
is a term of the unit type;
(…)
equality rules
Given a dependent type theory , its category of contexts is the category whose
morphisms are the terms of function type .
Composition is given in the evident way.
has finite limits and is a cartesian closed category.
Constructions are straightforward. We indicated some of them.
Notice that all finite limits (as discussed there) are induced as soon as there are all pullbacks and equalizers. A pullback in
is given by
The equalizer
is given by
Next, the internal hom/exponential object is given by function type
Define the -indexed hyperdoctrine by taking for the category to have as objects the -dependent types and as morphisms the terms of dependent function type .
This is cartesian closed by the same kind of argument as in the previous proof. It is now sufficient to exhibit a compatible equivalence of categories with the slice category .
In one direction, send a morphism to the dependent type
Conversely, for a dependent type, send it to the projection .
One shows that this indeed gives an equivalence of categories which is compatible with base change (Seely, prop. 3.2.4).
For a dependent type theory and a locally cartesian closed category, an interpretation of in is a morphism of locally cartesian closed categories
An interpretation of in another dependent type theory is a morphism of locally cartesian closed categories
Given a locally cartesian closed category , define the corresponding dependent type theory as follows
the non-dependent types of are the objects of ;
the -dependent types are the morphisms ;
a context is a tower of morphisms
the terms are the sections in
the equality type is the diagonal
…
All of the above has an analog in (∞,1)-category theory and homotopy type theory.
Every presentable and locally cartesian closed (∞,1)-category has a presentation by a type-theoretic model category. This provides the categorical semantics for homotopy type theory (without, possibly, the univalence axiom).
This includes in particular all (∞-stack-) (∞,1)-toposes (which should in addition satisfy univalence). See also at internal logic of an (∞,1)-topos.
Some form of this statement was originally formally conjectured in (Joyal 11), following (Awodey 10). For more details see at locally cartesian closed (∞,1)-category.
For more details see model of type theory in an (infinity,1)-topos.
A (locally presentable) locally Cartesian closed (∞,1)-category (as above) which in addition has a system of object classifiers is an ((∞,1)-sheaf-)(∞,1)-topos.
It has been conjectured in (Awodey 10) that this object classifier is the categorical semantics of a univalent type universe (type of types), hence that homotopy type theory with univalence has categorical semantics in (∞,1)-toposes. This statement was proven for the canonical -topos ∞Grpd in (Kapulkin-Lumsdaine-Voevodsky 12), and more generally for (∞,1)-presheaf -toposes over elegant Reedy categories in (Shulman 13). The general case is proven in Shulman 19.
In these proofs the type-theoretic model categories which interpret the homotopy type theory syntax are required to provide type universes that behave strictly under pullback. This matches the usual syntactically convenient universes in type theory (either a la Russell or a la Tarski), but more difficult to implement in the categorical semantics. More flexibly, one may consider syntactic type universes weakly à la Tarski (Luo 12, Gallozzi 14). These are more complicated to work with syntactically, but should have interpretations in a (type-theoretic model categories presenting) any (∞,1)-topos. Discussion of univalence in this general flexible sense is in (Gepner-Kock 12). For the general syntactic issue see at
While (∞,1)-sheaf (∞,1)-toposes are those currently understood, the basic type theory with univalent universes does not see or care about their local presentability as such (although it is used in other places, such as the construction of higher inductive types). It is to be expected that there is a decent concept of elementary (∞,1)-topos such that homotopy type theory with univalent type universes and some supply of higher inductive types has categorical semantics precisely in elementary (∞,1)-toposes (as conjectured in Awodey 10). But the fine-tuning of this statement is currently still under investigation.
Notice that this statement, once realized, makes (or would make) Univalent HoTT+HITs a sort of homotopy theoretic refinement of foundations of mathematics in topos theory as proposed by William Lawvere. It could be compared to his elementary theory of the category of sets, although being a type theory rather than a theory in first-order logic, it is more analogous to the internal type theory of an elementary topos.
An elementary exposition of in terms of the Haskell programming language is in
The equivalence of categories between first order theories and hyperdoctrines is discussed in
The categorical model of dependent types and initiality is discussed in
which was formalized inside type theory with set quotients of higher inductive types in:
Surveys inclue
Tom Hirschowitz, Introduction to categorical logic (2010) (pdf)
(see the discussion building up to the theorem on slide 96)
Roy Crole, Deriving category theory from type theory, Theory and Formal Methods 1993 Workshops in Computing 1993, pp 15-26
Maria Maietti, Modular correspondence between dependent type theories and categories including pretopoi and topoi, Mathematical Structures in Computer Science archive Volume 15 Issue 6, December 2005 Pages 1089 - 1149 (pdf)
The categorical semantics of linear logic in star-autonomous categories is due to
and reviews/further developments are in
G. M. Bierman, What is a Categorical Model of Intuitionistic Linear Logic? (web)
Andrew Graham Barber, Linear Type Theories, Semantics and Action Calculi, 1997 (web, pdf)
Paul-André Melliès , Categorial Semantics of Linear Logic, in Interactive models of computation and program behaviour, Panoramas et synthèses 27, 2009 (pdf)
For dependent linear type theory see:
Matthijs Vákár, Syntax and Semantics of Linear Dependent Types [arXiv:1405.0033]
Mitchell Riley, Eric Finster, Daniel Licata, Synthetic Spectra via a Monadic and Comonadic Modality [arXiv:2102.04099]
Mitchell Riley, Extending Homotopy Type Theory with Linear Type Formers, talk at The ForML Lab (2021) [web, video]
Mitchell Riley, A Bunched Homotopy Type Theory for Synthetic Stable Homotopy Theory, PhD Thesis (2022) [doi:10.14418/wes01.3.139, ir:3269, pdf]
(using ideas from bunched logic)
Mitchell Riley, Linear Homotopy Type Theory, talk at: HoTTEST Event for Junior Researchers 2022 (Jan 2022) [slides: pdf, video: YT]
The relation between typed lambda-calculus and cartesian closed categories is discussed in part I, and the adjunction between the category of type theories with product types and toposes is discussed in chapter II of:
The equivalence of categories between locally cartesian closed categories and dependent type theories was originally claimed in
following a statement earlier conjectured in
The problem with strict substitution compared to weak pullback in this argument was discussed and fixed in
Pierre-Louis Curien, Substitution up to isomorphism, Fundamenta Informaticae, 19 1-2 (1993) 51-86 [doi:10.5555/175469.175471] and: Diagrammes 23 (1990) 43-66 [numdam:DIA_1990__23__43_0]
Martin Hofmann, On the interpretation of type theory in locally cartesian closed categories, in Computer Science Logic. CSL 1994, Lecture Notes in Computer Science 933 (1994) 427–441 [doi:10.1007/BFb0022273]
but in the process the equivalence of categories was lost. This was finally all rectified in
and
Another version of this which also applies to intensional identity types and hence to homotopy type theory is in
Peter LeFanu Lumsdaine, Michael Warren, An overlooked coherence construction for dependent type theory, CT2013 (pdf)
Peter LeFanu Lumsdaine, Michael Warren, The local universes model: an overlooked coherence construction for dependent type theories (arXiv:1411.1736)
The analogous statement relating homotopy type theory and locally cartesian closed (infinity,1)-categories was formally conjectured around
following earlier suggestions by Steve Awodey. Explicitly, the suggestion that with the univalence axiom added this is refined to (∞,1)-topos theory appears around
Details on this higher categorical semantics of homotopy type theory are in
with lecture notes in
Mike Shulman, Categorical models of homotopy type theory, April 13, 2012 (pdf)
André Joyal, Remarks on homotopical logic, Oberwolfach (2011) (pdf)
André Joyal, Categorical homotopy type theory, March 17, 2014 (pdf)
See also
Chris Kapulkin, Type theory and locally cartesian closed quasicategories, Oxford 2014 (video)
Chris Kapulkin, Peter LeFanu Lumsdaine, The homotopy theory of type theories, Advances in Mathematics 337 (2018) 1-38 (arXiv:1610.00037, doi:10.1016/j.aim.2018.08.003)
Chris Kapulkin, Karol Szumilo, Internal Language of Finitely Complete -categories (arXiv:1709.09519)
Valery Isaev, Algebraic Presentations of Dependent Type Theories (arXiv:1602.08504)
Valery Isaev, Morita equivalences between algebraic dependent type theories (arXiv:1804.05045)
Models specifically in (constructive) cubical sets are discussed in
Marc Bezem, Thierry Coquand, Simon Huber, A model of type theory in cubical sets, 2013 (web, pdf)
Ambrus Kaposi, Thorsten Altenkirch, A syntax for cubical type theory (pdf)
Simon Docherty, A model of type theory in cubical sets with connection, 2014 (pdf)
A precise definition of elementary (infinity,1)-topos inspired by giving a natural equivalence to homotopy type theory with univalence was then proposed in
Categorical semantics of univalent type universes is discussed in
Steve Awodey, Type theory and homotopy (2010) (pdf)
Chris Kapulkin, Peter LeFanu Lumsdaine, Vladimir Voevodsky, The Simplicial Model of Univalent Foundations (arXiv:1211.2851)
Michael Shulman, The univalence axiom for elegant Reedy presheaves (arXiv:1307.6248)
David Gepner, Joachim Kock, Univalence in locally cartesian closed ∞-categories (arXiv:1208.1749)
Denis-Charles Cisinski, Univalent universes for elegant models of homotopy types (arXiv:1406.0058)
Proof of Awodey's conjecture, that all ∞-stack (∞,1)-topos have presentations by model categories which interpret (provide categorical semantics) for homotopy type theory with univalent type universes:
Introduction and review in:
Discussion of weak Tarskian homotopy type universes is in
Zhaohui Luo, Notes on Universes in Type Theory, 2012 (pdf)
Cesare Gallozzi, Constructive Set Theory from a Weak Tarski Universe, MSc thesis (2014) (pdf)
A discussion of the correspondence between type theories and categories of various sorts, from lex categories to toposes is in
Last revised on April 19, 2024 at 06:04:30. See the history of this page for a list of all contributions to it.